<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp"%>
<html>
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<meta charset="UTF-8">
		<title>共富券_共富网_Gofull.com.cn</title>
		<script src="/v3/js/jquery-1.10.2.min.js" type="text/javascript"></script>		
		<link type="text/css" rel="stylesheet" href="/v3/css/wstyle.css">
		<link type="text/css" rel="stylesheet" href="/v3/css/account.css">
	</head>
	<body>
		<div id="wrap">
			<div class="myVoucher">
				<s:if test="#request.voucherRecordList!=null || #request.voucherRecordList.size>0">
				<i class="icon-mVoucher"></i>
				<p>${availableVoucherCounts.num}张券</p>
				</s:if>
				<s:else>
				<i class="icon-mVoucherN"></i>
				<p>0张券</p>
				</s:else>
				
			</div>
			<div class="mVouItem">
			<s:if test="#request.voucherRecordList!=null || #request.voucherRecordList.size>0">
			<s:iterator value="#request.voucherRecordList" var="bean">
				<ul class="VouItem">
					<li class="v-money">
						金额
						<span class="blue">${bean.remainMoney}元</span>
					</li>
					<li class="v-range">
						使用范围
						<span class="blue">${bean.productLimit}</span>
					</li>
					<li class="v-time">
						截止日期
						<span class="org">${bean.deadTimeFormat}</span>
					</li>
					<li class="v-state">
						<div class="sta-bor">
							<s:if test="#bean.usableStatus==1">
									<s:if test="#bean.usableCounts==1"><span class="able-bt"><a href="/wchatIndex.do">可使用</a></span></s:if>
									<s:elseif test="#bean.usableCounts==0"><span class="disable-bt">已使用</span></s:elseif>
							</s:if> 
							<s:elseif test="#bean.usableStatus==2"><span class="disable-bt">已使用</span></s:elseif>
							<s:elseif test="#bean.usableStatus==3"><span class="disable-bt">已过期</span></s:elseif>
						</div>
					</li>
				</ul>
				</s:iterator>
				</s:if>
				<s:else>
				<p style="text-align:center;">暂无共富券</p>
				</s:else>
			</div>
			
			<s:if test="#request.voucherRecordList!=null || #request.voucherRecordList.size>0">
			<div class="page-bt-a">
				<s:if test="#request.currentPage == 1">
							<span class="disabled pre"> 上一页 </span>
						</s:if>
						<s:else>
							<a href="javascript:;" onclick="return gotoPage(${currentPage - 1});" class="pre">上一页 </a>
						</s:else>

						<s:if test="#request.currentPage == #request.totalPageNum">
							<span class="disabled next"> 下一页 </span>
						</s:if>
						<s:else>
							<a href="javascript:;" onclick="return gotoPage(${currentPage + 1});" class="next">下一页 </a>
						</s:else>
			</div>
			</s:if> 
		</div>
		<form id="pageSearchForm" name="pageSearchForm" action=""
			method="post"></form>
		<jsp:include page="/include/v3/footer.jsp"></jsp:include>
<script type="text/javascript">
$(window).load(function() {
$(".v-state").height($(".v-time").height()); 
});
function gotoPage(page){
	    $('#pageSearchForm').action = '/wchatVoucher.do';
	    var htmlStr = '<input type="hidden" name="currentPage" value="' + page + '" />';
	    $("#pageSearchForm").html(htmlStr).submit();
}
</script>

</body>
</html>
